﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
	xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
	mc:Ignorable="d"
	x:Class="MVVM_CAD.ObjectDescriptionControl"
	x:Name="UserControl"
	d:DesignWidth="200" d:DesignHeight="600" Width="250" Height="650" DataContext="{Binding FigureProperties, Mode=OneWay, Source={StaticResource Locator}}">

    <Grid x:Name="LayoutRoot" Width="200" Height="600">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="PropertiesDescription">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:0.7">
						<VisualTransition.GeneratedEasingFunction>
							<BackEase EasingMode="EaseOut" Amplitude="2"/>
						</VisualTransition.GeneratedEasingFunction>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="MouseOut">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="grid">
							<EasingDoubleKeyFrame KeyTime="0" Value="0.205"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="grid">
							<EasingDoubleKeyFrame KeyTime="0" Value="-5.5"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="grid">
							<EasingDoubleKeyFrame KeyTime="0" Value="0.393"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="grid">
							<EasingDoubleKeyFrame KeyTime="0" Value="10.5"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
							<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="MouseEnter">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="grid">
							<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Grid x:Name="grid" Margin="-8,40.75,-21,59.25" RenderTransformOrigin="0.5,0.5" Height="500">
			<i:Interaction.Triggers>
				<i:EventTrigger>
					<ei:GoToStateAction x:Name="OnMouseLeave" StateName="MouseOut"/>
				</i:EventTrigger>
				<ei:DataStoreChangedTrigger Binding="{Binding SelectedFigure}">
					<ei:GoToStateAction x:Name="OnDataChange" StateName="MouseEnter"/>
				</ei:DataStoreChangedTrigger>
			</i:Interaction.Triggers>
			<Grid.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Grid.RenderTransform>
			<Rectangle x:Name="PropertiesContainer" Fill="#FF3D3D3D" Height="500" Stroke="#FF959595" VerticalAlignment="Top" RadiusX="5" RadiusY="5" StrokeThickness="5" Margin="8,-0.5,21,0" Width="200"/>
            <TextBlock Height="20" Margin="62.728,82.25,47.272,0" TextWrapping="Wrap" VerticalAlignment="Top" Text="{Binding SelectedFigure.InitialPoint.Presenter, Mode=OneWay}" Foreground="White" />
            <TextBlock Height="20" Margin="62.728,105.25,47.272,0" TextWrapping="Wrap" VerticalAlignment="Top" Text="{Binding SelectedFigure.FinalPoint.Presenter, Mode=OneWay}" Foreground="White"/>
			<Label Content="Inicio" HorizontalAlignment="Left" Height="25" Margin="18,76.25,0,0" VerticalAlignment="Top" Width="53" Foreground="White"/>
			<Label Content="Fin" HorizontalAlignment="Left" Height="25" Margin="18,100.25,0,0" VerticalAlignment="Top" Width="53" Foreground="White"/>
			<Label Content="Propiedades" Height="26" Margin="18,8.25,35,0" VerticalAlignment="Top" Foreground="White" Background="#00000000"/>
			<Label Content="Cerrar" HorizontalAlignment="Right" Height="25" Margin="0,0,25.623,5.81" VerticalAlignment="Bottom" Width="44" Foreground="#FFABA6A6">
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="MouseLeftButtonDown">
						<ei:GoToStateAction x:Name="CloseProperties" StateName="MouseOut"/>
					</i:EventTrigger>
				</i:Interaction.Triggers>
			</Label>
			<Label Content="Title" HorizontalAlignment="Left" Height="23" Margin="17.999,55.25,0,0" VerticalAlignment="Top" Width="53" Foreground="White"/>
			<TextBox Height="23" Margin="62.728,55.25,47.272,0" TextWrapping="Wrap" Text="{Binding SelectedFigure.Name}" VerticalAlignment="Top" Background="#00000000" Foreground="#F6FFFFFF" BorderBrush="{x:Null}"/>
			<Rectangle Fill="#FF252424" Margin="19.434,139.25,33.566,123.402" RadiusY="5" RadiusX="5" StrokeThickness="5"/>
			<Label Content="Mover" HorizontalAlignment="Left" Height="24.148" Margin="25.428,139.25,0,0" VerticalAlignment="Top" Width="45.571" Foreground="White"/>
			<Label Content="X" HorizontalAlignment="Left" Height="25.976" Margin="45.409,163.398,0,0" VerticalAlignment="Top" Width="17.319" Foreground="White"/>
			<TextBox x:Name="textBox" HorizontalAlignment="Left" Height="21.976" Margin="62.728,165.398,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="35.305">
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="LostFocus">
						<GalaSoft_MvvmLight_Command:EventToCommand CommandParameter="{Binding Text, ElementName=textBox}" Command="{Binding MoveXCoordinateToolCommand, Mode=OneWay}"/>
					</i:EventTrigger>
				</i:Interaction.Triggers>
			</TextBox>
			<Label Content="Y" Height="25.976" Margin="106.693,163.398,104.988,0" VerticalAlignment="Top" Foreground="White"/>
			<TextBox x:Name="textBox1" Height="21.976" Margin="0,165.398,69.683,0" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Right" Width="35.305">
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="LostFocus">
                        <GalaSoft_MvvmLight_Command:EventToCommand CommandParameter="{Binding Text, ElementName=textBox1 }" Command="{Binding MoveYCoordinateToolCommand, Mode=OneWay}"/>
					</i:EventTrigger>
				</i:Interaction.Triggers>
			</TextBox>
			<Rectangle Fill="#7C959595" Height="2" Margin="25.428,201.369,39,0" StrokeThickness="0" VerticalAlignment="Top"/>
			<Label Content="Escalar" HorizontalAlignment="Left" Height="24.148" Margin="25.428,215.189,0,0" VerticalAlignment="Top" Width="45.571" Foreground="White"/>
			<Label Content="X" HorizontalAlignment="Left" Margin="45.409,239.337,0,234.687" Width="17.319" Foreground="White"/>
			<TextBox HorizontalAlignment="Left" Margin="62.728,241.337,0,236.687" TextWrapping="Wrap" Width="35.305" RenderTransformOrigin="0.5,0.5"/>
			<Label Content="Y" Margin="106.693,239.337,104.988,234.687" Foreground="White"/>
			<TextBox Margin="0,241.337,69.683,236.687" TextWrapping="Wrap" HorizontalAlignment="Right" Width="35.305"/>
			<Label Content="Rotar" HorizontalAlignment="Left" Height="24.148" Margin="25.428,0,0,183.392" VerticalAlignment="Bottom" Width="45.571" Foreground="White"/>
			<Label Content="Angulo" HorizontalAlignment="Left" Margin="51.404,0,0,157.416" Width="48.62" Foreground="#FFC6C6C6" Height="25.976" VerticalAlignment="Bottom" Background="#00000000"/>
			<TextBox Margin="109.348,0,84.347,159.416" TextWrapping="Wrap" Height="21.976" VerticalAlignment="Bottom"/>
			<Rectangle Fill="#7C959595" Margin="25.428,0,39,215.631" StrokeThickness="0" Height="2" VerticalAlignment="Bottom"/>
		</Grid>
	</Grid>
</UserControl>